php forum
php mysql forum
php mysql smarty
 
Topic Options
#283893 - 03/07/05 11:57 PM Finished-[6.4-6.5] Search FIX
id242_dup1 Offline
Member

Registered: 05/23/03
Posts: 159
Loc: Los Angeles
Mod Name / Version: Search FIX <br /> <br />Description: Fixes the search modules found in UBBT 6.4+ <br /> <br />Unlike conventional search engines such as google and yahoo... When entering multiple search terms to UBBT, you are required to use "+" or "-" in front of each word. If you don't, your results will display ANY matches of ANY of the words. <br /> <br />This fixes the "ANY, ALL or SOME" issue and returns functionality of your board's search engine to what most users are familiar with in the real world. <br /> <br />After inserting this code, the "ANY" feature will no longer work, but the plus side is that your users will no longer be afraid to use your search engine since they will have more positive results returned of what they are looking for. <br /> <br />(it basically returns your search "word" engine to that of what it was in version 6.3 and prior) <br /> <br />Working Under: UBB.Threads 6.4-6.5 <br /> <br />Mod Status: Finished <br /> <br />Any pre-requisites: none <br /> <br />Author(s): id242 <br /> <br />Date: 03/07/05 <br /> <br />Credits: Thanks to Myke for the update! <br /> <br />Files Altered: dosearch.php <br /> <br />New Files: none <br /> <br />Database Altered: no <br /> <br />Info/Instructions: in dosearch.php, find: <br />
Code:
 <br />// --------------------------------------------------------- <br />// The forums we are searching will be in a different format <br />// depending on where we are coming from <br />
<br /> <br />insert BEFORE it: <br />
Code:
 <br />// --------------------------------------------------------- <br />// FIX Search code ===START=== <br />if ($Words != "") { <br />	if (!strstr($Words, '"')) { <br />		if (!strstr($Words, " +")) { <br />			$Words = str_replace(" ", " +", $Words); <br />//			$Words = "+".$Words; <br />		} <br />	} <br />	$Words = str_replace(" +-", " -", $Words); <br />	$Words = str_replace(" ++", " +", $Words); <br />} <br />// FIX Search code ===END=== <br />
<br /> <br />Code has been updated with Myke's addtional code from #128269 - 06/09/05 04:32 AM, THANK YOU! <br /> <br />[Version numbers edited: Thanks for the update twisty <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> The correct ubbt version numbers that this fix works under has been corrected - also tested and working fine in a 6.5 install] <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Edited by id242 (07/15/05 05:18 PM)

Top
#283894 - 03/13/05 01:54 AM Re: Beta-[6.3-6.4] Search FIX [Re: VickiSmith]
Tina Offline
User

Registered: 07/22/04
Posts: 45
Is this an issue in 6.5.1 and, if so, will this work? I, too, have been dissatisfied with too many unfocused search results.<br /><br />Is it also true that the search engine does not search for strings of words between quotes?
_________________________
Helping the lost & lonely one sweet soul at a time...

Top
#283895 - 03/13/05 08:30 AM Re: Beta-[6.3-6.4] Search FIX [Re: ATP_JD]
id242_dup1 Offline
Member

Registered: 05/23/03
Posts: 159
Loc: Los Angeles
this may also work in 6.5x... but I am currently not running this version.<br /><br />(Slightly off-topic) I am however running a 100% unmodified version of "mysql.inc.php" from the 6.5x demo version with my current 6.2x highly hacked version - and there are absolutely NO issues. I have found that the error reporting is displayed much better using this file instead of the stock one that comes with 6.2x

Top
#283896 - 03/13/05 12:38 PM Re: Beta-[6.3-6.4] Search FIX [Re: VickiSmith]
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
The thing with searches, is that the KISS principle strongly applies. If it's too complicated for the average user to easily grasp then it's going to be far too frustrating and people will just avoid using it.<br /><br />This is why I like the search functionality in 6.3 the best. It's simple and straight-forward. What I did was hack it up by adding in an extra field to 'limit results by username'. Plus I also coded in the ability to see how many results are returned, with each page showing, for example...<br /><br />1-25 of 60 (for page 1)<br />26-50 of 60 (for page 2)<br />51-60 of 60 (for page 3)<br /><br />Also, there was a bug in the 6.3 dosearch script which prevented the search 'By Username' selection under Search Options from working that I fixed.<br /><br />I'm quite happy with it now, very user friendly imho...<br /><br />http://www.mameworld.info/ubbthreads/search.php?Cat=
_________________________
Twisty []http://www.mameworld.info/misc/nana2.gif[/]
MAMEWorld

Top
#283897 - 03/13/05 04:27 PM Re: Beta-[6.3-6.4] Search FIX [Re: smoknz28]
id242_dup1 Offline
Member

Registered: 05/23/03
Posts: 159
Loc: Los Angeles
Exactly, Twisty! And that is why I wrote this small hack as posted above - because it really does return the search back to the KISS principle. <br /><br />Many of my members are not programmers and really don't care to be. The use of " + " and " - " in their search arguments is just not going to happen.<br /><br />So i whipped up the above bit of code so search would work the same functionality as in 6.3x and prior - along with the same ability to select ("hand pick") different forums or cats as you want.

Top
#283898 - 03/13/05 11:14 PM Re: Beta-[6.3-6.4] Search FIX [Re: smoknz28]
Tina Offline
User

Registered: 07/22/04
Posts: 45
Very nice, Twisty... I imagine this is a bit different than the aforementioned code. Is this something you can share? I like the limit by "username" addition too. Is it, too, possible to place multiple usernames?
_________________________
Helping the lost & lonely one sweet soul at a time...

Top
#283899 - 03/14/05 03:51 AM Re: Beta-[6.3-6.4] Search FIX [Re: ATP_JD]
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
No multiple usernames aren't supported Sandi. It isn't something that I really find myself needing to be honest. <br /> <br />As for sharing the code, that probably wouldn't work for a number of reasons. I think some of the changes I made are version specific, and furthermore this is something I did a while back and probably can't even remeber what was changed exactly. Sorry <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Twisty []http://www.mameworld.info/misc/nana2.gif[/]
MAMEWorld

Top
#283900 - 03/14/05 04:06 AM Re: Beta-[6.3-6.4] Search FIX [Re: VickiSmith]
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
It's a pretty cool concept id242. It's what I'd do as well if using a newer threads version, most definitely.
_________________________
Twisty []http://www.mameworld.info/misc/nana2.gif[/]
MAMEWorld

Top
#283901 - 04/27/05 06:06 AM Re: Beta-[6.4-6.5] Search FIX [Re: VickiSmith]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Oh my God, thank you! *tears of joy*

Top
#283902 - 06/01/05 09:09 AM Re: Beta-[6.4-6.5] Search FIX [Re: VickiSmith]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
I'm running 6.5.<br /><br />After installing this fix, did anyone notice the "show all user's posts" when viewing a profile no longer works anymore? The following error message is displayed:<br /><br />Warning: Compilation failed: nothing to repeat at offset 2 in /path/to/ubb.t/dosearch.php on line 459<br /><br />I also get the same message if I just try a username search via the search page, except that results are actually shown as well.<br /><br />Anyone else experience this and have a fix?

Top
#283903 - 06/09/05 06:32 AM Re: Beta-[6.4-6.5] Search FIX [Re: kja]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
[]Myke said:<br />I'm running 6.5.<br /><br />After installing this fix, did anyone notice the "show all user's posts" when viewing a profile no longer works anymore? The following error message is displayed:<br /><br />Warning: Compilation failed: nothing to repeat at offset 2 in /path/to/ubb.t/dosearch.php on line 459<br /><br />I also get the same message if I just try a username search via the search page, except that results are actually shown as well.<br /><br />Anyone else experience this and have a fix? [/]<br /><br />Just wanted to share the fix for a problem I reported. BTW, I was getting the same error with the Active Topics and View Recent Messages links.<br /><br />Anyway, the error seemed to be due to the fact that those specific searches have no search words, yet the fix for this mod assumes there are and starts doing it's string replaces. To fix this, just enclose the fix in an if statement to check for the presence of words before proceeding:<br /><br />// FIX Search code ===START===<br /> [:"red"]if ($Words != "") {[/]<br /><br />...<br /><br /> [:"red"]}[/]<br />// FIX Search code ===END===

Top
#283904 - 07/12/05 02:26 PM Re: Beta-[6.4-6.5] Search FIX [Re: kja]
id242_dup1 Offline
Member

Registered: 05/23/03
Posts: 159
Loc: Los Angeles
Thanks Myke. Original post has been updated. <br /> <br />This code-modification has been moved from BETA to FINISHED - Thanks everyone

Top
#283905 - 07/12/05 02:36 PM Re: Finished-[6.4-6.5] Search FIX [Re: VickiSmith]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
thank you, I can use search now intelligently <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks